<?php
class UserSaveAlipayAccountAction extends UserAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'json';
	}
	
	protected function afterConstruct()
	{
		$this->parseDtds('user','alipay');
	}
	
	public function execute()
	{
		$this->code	= 200;
		if(!$this->data['user']['alipay_account'])
		{
			$data	= $this->getValidData();
			C('UserService')->update($this->data['user']['id'], array('alipay_account'=>$data['alipay_account']));
		}
	}
}
